package com.luli.enumeration;

/**
 * 陆离
 * 2022/10/18 16:25:30
 */
@SuppressWarnings("all")
public enum MessageEnum {
    PARAMS_ERROR("10001","参数有误"),
    ACCOUNT_PWD_NOT_EXISTS("10002","用户名或密码不存在"),
    NO_PERMISSION("70001","无权访问"),
    SESSION_TIMEOUT("90001","会话超时"),
    NO_LOGIN("90002","未登录"),
    TOKEN_ISNULL("9003","token为空"),
    CHECK_TOKEN_ERROR("9004","token校验失败"),
    REDIS_HAVE_EXPIRED("9005","redis已过期"),
    USERNAME_ISNULL("301","请检查用户名，长度（6-30）且不可为空"),
    PASSWORD_ERROR("302","请重新输入密码，长度（6-30）且不可为空"),
    PHONE_ERROR("303","手机号长度11位且不能为空"),
    PHONE_CODE_ERROR("3034","手机号格式有误"),
    SEX_ISNULL_ERROR("3035","性别不能为空"),
    SEX_PARAMETER_ERROR("3036","性别不能为空"),
    EMAIL_ERROR("3037","邮箱格式有误"),
    REGISTER_SUCCESS("2000","注册成功"),
    REGISTER_ERRORS("2001","注册失败"),
    DEL_USER_SUCCESS("1001","删除成功"),
    DEL_USER_ERRORS("1002","删除失败"),
    USER_ISNULL("1003","用户不存在"),
    UPDATE_USER_SUCCESS("1004","用户信息修改成功"),
    UPDATE_USER_ERROR("1004","用户信息修改失败"),
    ID_ISNULL("1005","账号为空"),
    ACCOUNT_ISNULL("1006","用户不存在")
            ;


    private String code;
    private String msg;

    MessageEnum(String code, String msg) {
//        this.code = code;
//        this.msg = msg;
        if (code.equals("1006")){
            System.out.println("123456");
        }else {
            System.out.println("456");
        }
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }



}
